package com.lixixi.tingshu.order.Config;

import com.lixixi.tingshu.order.handler.ProducerResultHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.core.KafkaTemplate;

@Configuration
public class KafkaConfig {
	//设置回调方法
	@Bean
	KafkaTemplate setProducerSendHandler(KafkaTemplate kafkaTemplate, ProducerResultHandler producerResultHandler){
		kafkaTemplate.setProducerListener(producerResultHandler);
		return kafkaTemplate;
	}
}
